* {
  margin: 0;
  padding: 0;
  font-size: 16px;
  color: #fff;
}
.upload {
  width: 200px;
  height: 200px;
  margin: 20px 20px;
  position: relative;
}
.upload * {
  box-sizing: border-box;
}

.upload > div {
  display: none;
}
.upload.select .upload-select {
  display: block;
  position: relative;
  height: 100%;
  width: 100%;
  border: 2px dashed #ccc;
}
.upload.select .upload-select > input {
  position: relative;
 width: 0;
  opacity: 0;
  z-index: 3;
}
.upload.select .upload-select::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100px;
  width: 100px;
  background-image: url(./plus.png);
  background-size: 50%;
  background-position: center;
  background-repeat: no-repeat;
}
.upload.select .upload-select::before {
  content: "点击上传";
  position: absolute;
  top: 60%;
  color: #222;
  left: 50%;
  transform: translate(-50%, 0);
}

.upload.progress .upload-progress {
  display: block;
  position: relative;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.upload.progress .upload-progress .progress-bar {
  position: relative;
  height: 4px;
  width: 90%;
  background-color: #fff;
  top: 44%;
  border-radius: 2px;
  margin: 0 auto;
}
.upload.progress .upload-progress .progress-bar::after {
  position: absolute;
  content: "";
  height: 4px;
  width: calc(var(--precent) * 1%);
  left: 0;
  background-color: #36f;
  z-index: 4;
}
.upload.progress .upload-progress .progress-bar::before {
  counter-reset: process var(--precent);
  content: counter(process) "%";
  position: absolute;
  left: 50%;
  transform: translate(-50%, -25px);
}

.btn-cancel {
  position: absolute;
  background-color: transparent;
  border: none;
  bottom: 20%;
  left: 50%;
  transform: translate(-50%, 0);
}

.upload.progress .upload-preview {
  position: absolute;
  top: 0;
  object-fit: contain;
  width: 200px;
  height: 200px;
  z-index: 1;
}
.btn-del{
    border: none;
    background-color: #222;
    padding:0 5px;
}
.upload.result .upload-result{
    display: block;
    height: 20px;
}
.upload.result .upload-preview {
    position: absolute;
  object-fit: contain;
    
    top: 20px;
    width: 200px;
    height: 180px;
    z-index: 1;
  }
  